cvs commit: mod_parrot mod_parrot.c mod_parrot.h

[email protected]
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
cvsuser     02/05/28 12:32:32

  Modified:    .        mod_parrot.c mod_parrot.h
  Log:
  Woops.  You need this addition to mod_parrot.c to make that previous
  change to apache.pmc work.
  
  Revision  Changes    Path
  1.9       +15 -0     mod_parrot/mod_parrot.c
  
  Index: mod_parrot.c
  ===================================================================
  RCS file: /cvs/public/mod_parrot/mod_parrot.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- mod_parrot.c	24 May 2002 17:26:35 -0000	1.8
  +++ mod_parrot.c	28 May 2002 19:32:32 -0000	1.9
  @@ -23,6 +23,8 @@
   Parrot_Interp interpreter;
   request_rec *sharedr;
   
  +/* functions which allow apache.pmc to talk to the request_rec object */
  +
   int modparrot_printf(const char *format, ...) {
     va_list ap;
     char buf[2048];
  @@ -48,6 +50,19 @@
       strncpy(s,sharedr->args,1024);
       s[1023] = '\0';
       return s;
  +}
  +
  +char* modparrot_get_remoteip(void) {
  +  char* s;
  +
  +  s = (char*)malloc(sizeof(char)*16);
  +
  +  if (!sharedr->connection->remote_ip)
  +    return NULL;
  +
  +  strncpy(s,sharedr->connection->remote_ip,16);
  +  s[15] = '\0';
  +  return s;
   }
   
   static int parrot_handler(request_rec *r)
  
  
  
  1.2       +1 -0      mod_parrot/mod_parrot.h
  
  Index: mod_parrot.h
  ===================================================================
  RCS file: /cvs/public/mod_parrot/mod_parrot.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- mod_parrot.h	17 May 2002 03:16:23 -0000	1.1
  +++ mod_parrot.h	28 May 2002 19:32:32 -0000	1.2
  @@ -1,2 +1,3 @@
   int modparrot_printf(const char *format, ...);
   char* modparrot_getargs(void);
  +char* modparrot_get_remoteip(void);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.