[pulseaudio-commits] r2410 - /branches/coling/airtunes/src/modules/rtp/rtsp_client.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sun May 11 09:40:28 PDT 2008
Author: coling
Date: Sun May 11 18:40:26 2008
New Revision: 2410
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2410&root=pulseaudio&view=rev
Log:
Do not prefix internal function rtsp_exec.
Change port to be 16 bits
Do not free stuff on closure as this happens further up the stack.
Modified:
branches/coling/airtunes/src/modules/rtp/rtsp_client.c
Modified: branches/coling/airtunes/src/modules/rtp/rtsp_client.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/coling/airtunes/src/modules/rtp/rtsp_client.c?rev=2410&root=pulseaudio&r1=2409&r2=2410&view=diff
==============================================================================
--- branches/coling/airtunes/src/modules/rtp/rtsp_client.c (original)
+++ branches/coling/airtunes/src/modules/rtp/rtsp_client.c Sun May 11 18:40:26 2008
@@ -70,13 +70,13 @@
char *localip;
char *url;
- uint32_t port;
+ uint16_t port;
uint32_t cseq;
char *session;
char *transport;
};
-static int pa_rtsp_exec(pa_rtsp_client* c, const char* cmd,
+static int rtsp_exec(pa_rtsp_client* c, const char* cmd,
const char* content_type, const char* content,
int expect_response,
pa_headerlist* headers) {
@@ -193,7 +193,7 @@
while ((token = pa_split(c->transport, delimiters, &token_state))) {
if ((pc = strstr(token, "="))) {
if (0 == strncmp(token, "server_port", 11)) {
- pa_atou(pc+1, &c->port);
+ pa_atou(pc+1, (uint32_t*)(&c->port));
pa_xfree(token);
break;
}
@@ -227,9 +227,6 @@
pa_assert(c->callback);
if (!s) {
- pa_ioline_unref(c->ioline);
- c->ioline = NULL;
- pa_rtsp_disconnect(c);
c->callback(c, STATE_DISCONNECTED, NULL, c->userdata);
return;
}
@@ -442,7 +439,7 @@
return -1;
c->state = STATE_ANNOUNCE;
- return pa_rtsp_exec(c, "ANNOUNCE", "application/sdp", sdp, 1, NULL);
+ return rtsp_exec(c, "ANNOUNCE", "application/sdp", sdp, 1, NULL);
}
@@ -456,7 +453,7 @@
pa_headerlist_puts(headers, "Transport", "RTP/AVP/TCP;unicast;interleaved=0-1;mode=record");
c->state = STATE_SETUP;
- rv = pa_rtsp_exec(c, "SETUP", NULL, NULL, 1, headers);
+ rv = rtsp_exec(c, "SETUP", NULL, NULL, 1, headers);
pa_headerlist_free(headers);
return rv;
}
@@ -477,7 +474,7 @@
pa_headerlist_puts(headers, "RTP-Info", "seq=0;rtptime=0");
c->state = STATE_RECORD;
- rv = pa_rtsp_exec(c, "RECORD", NULL, NULL, 1, headers);
+ rv = rtsp_exec(c, "RECORD", NULL, NULL, 1, headers);
pa_headerlist_free(headers);
return rv;
}
@@ -487,7 +484,7 @@
pa_assert(c);
c->state = STATE_TEARDOWN;
- return pa_rtsp_exec(c, "TEARDOWN", NULL, NULL, 0, NULL);
+ return rtsp_exec(c, "TEARDOWN", NULL, NULL, 0, NULL);
}
@@ -497,7 +494,7 @@
return -1;
c->state = STATE_SET_PARAMETER;
- return pa_rtsp_exec(c, "SET_PARAMETER", "text/parameters", param, 1, NULL);
+ return rtsp_exec(c, "SET_PARAMETER", "text/parameters", param, 1, NULL);
}
@@ -511,7 +508,7 @@
pa_headerlist_puts(headers, "RTP-Info", "seq=0;rtptime=0");
c->state = STATE_FLUSH;
- rv = pa_rtsp_exec(c, "FLUSH", NULL, NULL, 1, headers);
+ rv = rtsp_exec(c, "FLUSH", NULL, NULL, 1, headers);
pa_headerlist_free(headers);
return rv;
}
More information about the pulseaudio-commits
mailing list