Re: Re: mod_mp3-2 and Apache 2.0.48
Devon Jones <[email protected]> Wed, 28 Jan 2004 15:27:17 -0700
| Newsgroups | gmane.comp.apache.mod-mp3 |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------010703010706080107050501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Devon Jones wrote:
> Brian Aker wrote:
>
>> Well I fixed that bug (solution committed). I think there still me an
>> issue with the install though...
>> -Brian
>>
>>
>>
ok, whole raft of issues:
I don't know apache or apache2, but what I did do is debug some, and get
you a CVS diff of some apache2 ifdefs that I added to the code around
problem pieces of code
also, since it's not an apache problem, the line:
if (getID3ByFile(info_ptr, filename))
in load.c errors, saying getID3ByFile is an unrecognized symbol - do I
need to add libID3 to my library path for apache?
--
Soulcatcher (Devon Jones)
PCGen BoD
GMGen Silverback
--------------010703010706080107050501
Content-Type: text/plain;
name="diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="diff"
Index: directives.c
===================================================================
RCS file: /cvs/mod_mp3/src/directives.c,v
retrieving revision 1.27
diff -u -r1.27 directives.c
--- directives.c 9 Jan 2004 21:07:16 -0000 1.27
+++ directives.c 28 Jan 2004 22:38:11 -0000
@@ -64,11 +64,15 @@
MP3_EXPORT(const char *) add_log(cmd_parms *cmd, void *mconfig, char *filename) {
mp3_conf *cfg = (mp3_conf *) mconfig;
+#ifdef APACHE2
+//TODO: Apache 2 implementation
+#else
if (!(cfg->log = (int)ap_popenf(cmd->pool, filename, (O_WRONLY | O_APPEND | O_CREAT),(S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)))) {
mp3_log_error (cmd->server,
"Can not open mp3 log file: %s(%s)", filename, strerror(errno));
exit(1);
}
+#endif
cfg->log_filename = ap_pstrdup(cmd->pool, filename);
return NULL;
Index: ice.c
===================================================================
RCS file: /cvs/mod_mp3/src/ice.c,v
retrieving revision 1.17
diff -u -r1.17 ice.c
--- ice.c 28 Dec 2003 21:38:39 -0000 1.17
+++ ice.c 28 Jan 2004 22:38:11 -0000
@@ -64,17 +64,25 @@
hp = (struct hostent *)gethostbyname(r->connection->remote_ip);
memcpy(&serv.sin_addr, hp->h_addr, hp->h_length);
+#ifdef APACHE2
+//TODO: Apache implementation
+#else
if ((socket = ap_psocket (r->pool, AF_INET, SOCK_DGRAM, 0)) < 0) {
mp3_log_rerror(r, "Failing socket creation(%s)", strerror(errno));
return;
}
+#endif
if (fcntl(socket, F_SETFL, O_NONBLOCK) < 0) {
mp3_log_rerror(r,
"Failing blocking for %s(%s)",
r->connection->remote_ip,
strerror(errno));
+#ifdef APACHE2
+//TODO: Apache implementation
+#else
ap_pclosesocket(r->pool, socket);
+#endif
return;
}
@@ -82,6 +90,10 @@
mp3_log_rerror(r, "Failing sending a message to %s(%s)", r->connection->remote_ip,
strerror(errno));
}
+#ifdef APACHE2
+//TODO: Apache implementation
+#else
ap_pclosesocket(r->pool, socket);
+#endif
return;
}
Index: load.c
===================================================================
RCS file: /cvs/mod_mp3/src/load.c,v
retrieving revision 1.33
diff -u -r1.33 load.c
--- load.c 9 Jan 2004 21:07:16 -0000 1.33
+++ load.c 28 Jan 2004 22:38:11 -0000
@@ -140,7 +140,11 @@
caddr_t temp;
/* Yes, this is redundanct at the moment */
/* Ok, long run we need to check this */
+#ifdef APACHE2
+//TODO: Apache2 implementation
+#else
fd = ap_popenf(p, filename, O_RDONLY, 0);
+#endif
lseek(fd, 0, SEEK_SET);
temp = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0);
if((temp ==(caddr_t)-1))
Index: mod_mp3.c
===================================================================
RCS file: /cvs/mod_mp3/src/mod_mp3.c,v
retrieving revision 1.120
diff -u -r1.120 mod_mp3.c
--- mod_mp3.c 28 Dec 2003 21:38:39 -0000 1.120
+++ mod_mp3.c 28 Jan 2004 22:38:12 -0000
@@ -153,7 +153,11 @@
send_udp_message(r, request->udp, message);
}
+#ifdef APACHE2
+//TODO: Apache2 implementation
+#else
ap_hard_timeout("mod_mp3_write", r);
+#endif
connection_set_file(r, scfg, content->signature, content->name);
@@ -197,10 +201,17 @@
send_udp_message(r, request->udp, message);
}
}
+#ifdef APACHE2
+//TODO: Apache2 implementation
+#else
ap_pfclose(r->pool, file);
+#endif
}
+#ifdef APACHE2
+//TODO: Apache2 implementation
+#else
ap_kill_timeout(r);
-
+#endif
return OK;
}
--------------010703010706080107050501--