Skip to content

Conversation

@wdoekes
Copy link
Owner

@wdoekes wdoekes commented Mar 5, 2014

  • kill.c was missing an #include
  • pass_fd.c did illegal pointer to integer casting

wdoekes added 2 commits March 5, 2014 12:18
    Compiling kill.c
    kill.c: In function ‘__popen’:
    kill.c:129:2: warning: implicit declaration of function ‘pipe’ [-Wimplicit-function-declaration]
      if (pipe(fds) != 0) {
      ^
    kill.c:134:2: warning: implicit declaration of function ‘fork’ [-Wimplicit-function-declaration]
      ret = fork();
      ^
    kill.c:139:4: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
        close(fds[READ]);
        ^
    kill.c:140:4: warning: implicit declaration of function ‘dup2’ [-Wimplicit-function-declaration]
        dup2(fds[WRITE], 1);
        ^
    kill.c:148:3: warning: implicit declaration of function ‘execl’ [-Wimplicit-function-declaration]
       execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
       ^
    kill.c:148:3: warning: incompatible implicit declaration of built-in function ‘execl’ [enabled by default]
    Compiling pass_fd.c
    pass_fd.c: In function ‘send_fd’:
    pass_fd.c:132:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      *(int*)CMSG_DATA(cmsg)=fd;
      ^
    pass_fd.c: In function ‘receive_fd’:
    pass_fd.c:240:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       *fd=*((int*) CMSG_DATA(cmsg));
       ^
@wdoekes wdoekes closed this Mar 5, 2014
wdoekes pushed a commit that referenced this pull request Oct 8, 2014
Dialplan Features/Patch Backport
wdoekes pushed a commit that referenced this pull request Apr 23, 2019
Due to the fact that run_rr_callbacks() returns the 2nd Route (Path)
header field value when previously having done protocol switching (thus
having inserted two Path headers), the "use_path_received" feature of
the path module would not work -- it wouldn't set the $du at all.

The reason for this is that add_path_received() appends its ";received="
to inside Path #1 (the outbound path of the registration / the inbound
path of future requests) when doing double-Path recording.

This patch simply moves the ";received=" append operation performed by
add_path_received() into Path #2 (inbound path of registration /
outbound path of future requests), and adapts other code that needs it
(e.g. save("location", "p1v")) to properly be able to fetch it.

Reported by @futsystems

Fixes OpenSIPS#1358

(cherry picked from commit 71c7d75)
wdoekes pushed a commit that referenced this pull request Apr 24, 2019
Due to the fact that run_rr_callbacks() returns the 2nd Route (Path)
header field value when previously having done protocol switching (thus
having inserted two Path headers), the "use_path_received" feature of
the path module would not work -- it wouldn't set the $du at all.

The reason for this is that add_path_received() appends its ";received="
to inside Path #1 (the outbound path of the registration / the inbound
path of future requests) when doing double-Path recording.

This patch simply moves the ";received=" append operation performed by
add_path_received() into Path #2 (inbound path of registration /
outbound path of future requests), and adapts other code that needs it
(e.g. save("location", "p1v")) to properly be able to fetch it.

Reported by @futsystems

Fixes OpenSIPS#1358
wdoekes added a commit that referenced this pull request Apr 15, 2025
  #0  db_free_row (_r=_r@entry=0x7fbb5ba13390) at db/db_row.c:64
  #1  0x000055f374948f30 in db_free_rows (_r=_r@entry=0x7fbb5ba220e8) at db/db_res.c:55
  #2  0x000055f374949781 in db_free_result (_r=0x7fbb5ba220e8) at db/db_res.c:116
  OpenSIPS#3  0x00007fbb5a73aa6b in db_mysql_free_result (_h=0x7fbb5ba1dea0, _r=<optimized out>) at dbase.c:896
  OpenSIPS#4  0x00007fbb5944391e in update_presentity (msg=msg@entry=0x7fbb5ba1e658,
        presentity=presentity@entry=0x7ffdc2b4e8d0, sent_reply=sent_reply@entry=0x7ffdc2b4e854)
        at presentity.c:859
  OpenSIPS#5  0x00007fbb594343f6 in handle_publish (msg=<optimized out>, sender_uri=<optimized out>,
       str2=<optimized out>) at publish.c:534

With memory:

  (gdb) print(&((db_res_t*)0)->n)
  $9 = (int *) 0x20

  (gdb) print(((char*)_r)+0x20)
  $15 = 0x7fbb5ba22108 "Expires: 0\r\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants