Mercurial > pidgin
comparison src/proxy.c @ 2048:3366311426df
[gaim-migrate @ 2058]
little things
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Sun, 17 Jun 2001 08:37:44 +0000 |
| parents | a02584b98823 |
| children | b66aca8e8dce |
comparison
equal
deleted
inserted
replaced
| 2047:21f1f1e0d4c5 | 2048:3366311426df |
|---|---|
| 55 }; | 55 }; |
| 56 | 56 |
| 57 static void no_one_calls(gpointer data, gint source, GdkInputCondition cond) | 57 static void no_one_calls(gpointer data, gint source, GdkInputCondition cond) |
| 58 { | 58 { |
| 59 struct PHB *phb = data; | 59 struct PHB *phb = data; |
| 60 int len, error = ETIMEDOUT; | 60 unsigned int len; |
| 61 int error = ETIMEDOUT; | |
| 61 debug_printf("Connected\n"); | 62 debug_printf("Connected\n"); |
| 62 len = sizeof(error); | 63 len = sizeof(error); |
| 63 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 64 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 64 close(source); | 65 close(source); |
| 65 gdk_input_remove(phb->inpa); | 66 gdk_input_remove(phb->inpa); |
| 116 close(fd); | 117 close(fd); |
| 117 g_free(phb); | 118 g_free(phb); |
| 118 return -1; | 119 return -1; |
| 119 } | 120 } |
| 120 } else { | 121 } else { |
| 121 int len, error = ETIMEDOUT; | 122 unsigned int len; |
| 123 int error = ETIMEDOUT; | |
| 122 debug_printf("Connect didn't block\n"); | 124 debug_printf("Connect didn't block\n"); |
| 123 len = sizeof(error); | 125 len = sizeof(error); |
| 124 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 126 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 125 close(fd); | 127 close(fd); |
| 126 g_free(phb); | 128 g_free(phb); |
| 175 | 177 |
| 176 static void http_canwrite(gpointer data, gint source, GdkInputCondition cond) | 178 static void http_canwrite(gpointer data, gint source, GdkInputCondition cond) |
| 177 { | 179 { |
| 178 char cmd[384]; | 180 char cmd[384]; |
| 179 struct PHB *phb = data; | 181 struct PHB *phb = data; |
| 180 int len, error = ETIMEDOUT; | 182 unsigned int len; |
| 183 int error = ETIMEDOUT; | |
| 181 debug_printf("Connected\n"); | 184 debug_printf("Connected\n"); |
| 182 if (phb->inpa > 0) | 185 if (phb->inpa > 0) |
| 183 gdk_input_remove(phb->inpa); | 186 gdk_input_remove(phb->inpa); |
| 184 len = sizeof(error); | 187 len = sizeof(error); |
| 185 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 188 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 264 g_free(phb->host); | 267 g_free(phb->host); |
| 265 g_free(phb); | 268 g_free(phb); |
| 266 return -1; | 269 return -1; |
| 267 } | 270 } |
| 268 } else { | 271 } else { |
| 269 int len, error = ETIMEDOUT; | 272 unsigned int len; |
| 273 int error = ETIMEDOUT; | |
| 270 debug_printf("Connect didn't block\n"); | 274 debug_printf("Connect didn't block\n"); |
| 271 len = sizeof(error); | 275 len = sizeof(error); |
| 272 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 276 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 273 close(fd); | 277 close(fd); |
| 274 g_free(phb->host); | 278 g_free(phb->host); |
| 306 static void s4_canwrite(gpointer data, gint source, GdkInputCondition cond) | 310 static void s4_canwrite(gpointer data, gint source, GdkInputCondition cond) |
| 307 { | 311 { |
| 308 unsigned char packet[12]; | 312 unsigned char packet[12]; |
| 309 struct hostent *hp; | 313 struct hostent *hp; |
| 310 struct PHB *phb = data; | 314 struct PHB *phb = data; |
| 311 int len, error = ETIMEDOUT; | 315 unsigned int len; |
| 316 int error = ETIMEDOUT; | |
| 312 debug_printf("Connected\n"); | 317 debug_printf("Connected\n"); |
| 313 if (phb->inpa > 0) | 318 if (phb->inpa > 0) |
| 314 gdk_input_remove(phb->inpa); | 319 gdk_input_remove(phb->inpa); |
| 315 len = sizeof(error); | 320 len = sizeof(error); |
| 316 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 321 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 387 g_free(phb->host); | 392 g_free(phb->host); |
| 388 g_free(phb); | 393 g_free(phb); |
| 389 return -1; | 394 return -1; |
| 390 } | 395 } |
| 391 } else { | 396 } else { |
| 392 int len, error = ETIMEDOUT; | 397 unsigned int len; |
| 398 int error = ETIMEDOUT; | |
| 393 debug_printf("Connect didn't block\n"); | 399 debug_printf("Connect didn't block\n"); |
| 394 len = sizeof(error); | 400 len = sizeof(error); |
| 395 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 401 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 396 close(fd); | 402 close(fd); |
| 397 g_free(phb->host); | 403 g_free(phb->host); |
| 537 static void s5_canwrite(gpointer data, gint source, GdkInputCondition cond) | 543 static void s5_canwrite(gpointer data, gint source, GdkInputCondition cond) |
| 538 { | 544 { |
| 539 unsigned char buf[512]; | 545 unsigned char buf[512]; |
| 540 int i; | 546 int i; |
| 541 struct PHB *phb = data; | 547 struct PHB *phb = data; |
| 542 int len, error = ETIMEDOUT; | 548 unsigned int len; |
| 549 int error = ETIMEDOUT; | |
| 543 debug_printf("Connected\n"); | 550 debug_printf("Connected\n"); |
| 544 if (phb->inpa > 0) | 551 if (phb->inpa > 0) |
| 545 gdk_input_remove(phb->inpa); | 552 gdk_input_remove(phb->inpa); |
| 546 len = sizeof(error); | 553 len = sizeof(error); |
| 547 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 554 if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 614 g_free(phb->host); | 621 g_free(phb->host); |
| 615 g_free(phb); | 622 g_free(phb); |
| 616 return -1; | 623 return -1; |
| 617 } | 624 } |
| 618 } else { | 625 } else { |
| 619 int len, error = ETIMEDOUT; | 626 unsigned int len; |
| 627 int error = ETIMEDOUT; | |
| 620 debug_printf("Connect didn't block\n"); | 628 debug_printf("Connect didn't block\n"); |
| 621 len = sizeof(error); | 629 len = sizeof(error); |
| 622 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { | 630 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { |
| 623 close(fd); | 631 close(fd); |
| 624 g_free(phb->host); | 632 g_free(phb->host); |
