Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SipClass::registerField(char * buf, uint8_t *ip){
- strcpy(buf, "REGISTER SIP:");
- for(uint8_t i = 0;i<3;i++){
- char *c = (char *)calloc(3, sizeof(char));
- itoa (ip[i], c, 10);
- strcat(buf, c);
- free(c);
- strcat(buf, ".");
- }
- char *c = (char *)calloc(3, sizeof(char));
- itoa (ip[4], c, 10);
- strcat(buf, c);
- free(c);
- strcat(buf, " SIP/2.0\n");
- }
Add Comment
Please, Sign In to add comment