src/proxy.c

changeset 10912
ec7c127a435b
parent 10711
f6279a730e85
child 10917
f32ea2da503b
equal deleted inserted replaced
10911:e2cc7dddee17 10912:ec7c127a435b
1574 return; 1574 return;
1575 } 1575 }
1576 1576
1577 if (buf[1] == 0x02) { 1577 if (buf[1] == 0x02) {
1578 unsigned int i, j; 1578 unsigned int i, j;
1579 1579 const char *u, *p;
1580 i = strlen(gaim_proxy_info_get_username(phb->gpi)); 1580
1581 j = strlen(gaim_proxy_info_get_password(phb->gpi)); 1581 u = gaim_proxy_info_get_username(phb->gpi);
1582 p = gaim_proxy_info_get_password(phb->gpi);
1583
1584 i = (u == NULL) ? 0 : strlen(u);
1585 j = (p == NULL) ? 0 : strlen(p);
1582 1586
1583 buf[0] = 0x01; /* version 1 */ 1587 buf[0] = 0x01; /* version 1 */
1584 buf[1] = i; 1588 buf[1] = i;
1585 memcpy(buf + 2, gaim_proxy_info_get_username(phb->gpi), i); 1589 memcpy(buf + 2, gaim_proxy_info_get_username(phb->gpi), i);
1586 buf[2 + i] = j; 1590 buf[2 + i] = j;

mercurial