]> granicus.if.org Git - libevent/commitdiff
Remove all trailing whitespace from end-of-line.
authorNick Mathewson <nickm@torproject.org>
Fri, 17 Jul 2009 18:38:38 +0000 (18:38 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 17 Jul 2009 18:38:38 +0000 (18:38 +0000)
svn:r1350

event-internal.h
event.h
event_rpcgen.py
evrpc-internal.h
evrpc.c
http-internal.h
include/event2/http.h
include/event2/rpc.h
include/event2/rpc_struct.h
test/regress.c
test/regress_http.c

index cca5feb6333141a94b38d11df52dc9d438544365..527ee2cee419d5b9da4f24eaefee6fb1e333d188 100644 (file)
@@ -12,7 +12,7 @@
  *    documentation and/or other materials provided with the distribution.
  * 3. The name of the author may not be used to endorse or promote products
  *    derived from this software without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
diff --git a/event.h b/event.h
index 890961e69f161c19f9c5e537b032a2c34a29c648..b7d3b333d479eb3099780668ed1fa8b115e1f5ae 100644 (file)
--- a/event.h
+++ b/event.h
   callbacks have been registered for a given URI.
 
   @section evrpc A framework for RPC servers and clients
+
   libevents provides a framework for creating RPC servers and clients.  It
   takes care of marshaling and unmarshaling all data structures.
 
index c401fab21ac801d7c197022ad44f020e6173dc87..136d6a83b6830b8a65fe48c251521ea760df4a96 100755 (executable)
@@ -728,7 +728,7 @@ class EntryString(Entry):
 
     def CodeClear(self, structname):
         code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()),
-                 '  free (%s->%s_data);' % (structname, self.Name()),
+                 '  free(%s->%s_data);' % (structname, self.Name()),
                  '  %s->%s_data = NULL;' % (structname, self.Name()),
                  '  %s->%s_set = 0;' % (structname, self.Name()),
                  '}'
@@ -914,7 +914,7 @@ class EntryStruct(Entry):
 
     def CodeFree(self, name):
         code  = ['if (%s->%s_data != NULL)' % (name, self._name),
-                 '    %s_free(%s->%s_data); ' % (
+                 '    %s_free(%s->%s_data);' % (
             self._refname, name, self._name)]
 
         return code
@@ -1030,7 +1030,7 @@ class EntryVarBytes(Entry):
 
     def CodeFree(self, name):
         code  = ['if (%s->%s_data != NULL)' % (name, self._name),
-                 '    free (%s->%s_data); ' % (name, self._name)]
+                 '    free(%s->%s_data);' % (name, self._name)]
 
         return code
 
@@ -1479,7 +1479,7 @@ def GetNextStruct(file):
             continue
 
         if len(tokens[1]):
-            raise RpcGenError('Trailing garbage after struct on line %d' 
+            raise RpcGenError('Trailing garbage after struct on line %d'
                               % line_count)
 
         # We found the end of the struct
@@ -1676,7 +1676,7 @@ class CommandLine:
             entry.PrintCode(impl_fp)
         impl_fp.close()
 
-if __name__ == '__main__': 
+if __name__ == '__main__':
     try:
         CommandLine(sys.argv).run()
         sys.exit(0)
index 79065ccb7a0a12814bcaa90d55b194d33336bc1b..b1431f0342b75812ec5e68e94755b6f150ba2e46 100644 (file)
@@ -60,7 +60,7 @@ struct _evrpc_hooks {
        /* hooks for processing outbound and inbound rpcs */
        struct evrpc_hook_list in_hooks;
        struct evrpc_hook_list out_hooks;
-       
+
        struct evrpc_pause_list pause_requests;
 };
 
@@ -142,7 +142,7 @@ struct evrpc_req_generic {
        /* the empty reply object that needs to be filled in */
        void *reply;
 
-       /* 
+       /*
         * the static structure for this rpc; that can be used to
         * automatically unmarshal and marshal the http buffers.
         */
diff --git a/evrpc.c b/evrpc.c
index 9d6daa29e13a6bdc65779f86c4607a959827d8be..971465aa3e201ae15104a7466e44356d934cf78a 100644 (file)
--- a/evrpc.c
+++ b/evrpc.c
@@ -1106,7 +1106,7 @@ evrpc_register_generic(struct evrpc_base *base, const char *name,
     int (*rpl_complete)(void *),
     void (*rpl_marshal)(struct evbuffer *, void *))
 {
-       struct evrpc* rpc = 
+       struct evrpc* rpc =
            evrpc_register_object(name, req_new, req_free, req_unmarshal,
                rpl_new, rpl_free, rpl_complete, rpl_marshal);
        if (rpc == NULL)
index ab3d80399ebb9a836c7116519fd003df5d7bb4eb..b81f198518c5c8dbce9fe29ac58265a4385d839a 100644 (file)
@@ -63,7 +63,7 @@ struct evhttp_connection {
        struct bufferevent *bufev;
 
        struct event retry_ev;          /* for retrying connects */
-       
+
        char *bind_address;             /* address to use for binding the src */
        u_short bind_port;              /* local port for binding the src */
 
@@ -78,17 +78,17 @@ struct evhttp_connection {
        int timeout;                    /* timeout in seconds for events */
        int retry_cnt;                  /* retry count */
        int retry_max;                  /* maximum number of retries */
-       
+
        enum evhttp_connection_state state;
 
        /* for server connections, the http server they are connected with */
        struct evhttp *http_server;
 
        TAILQ_HEAD(evcon_requestq, evhttp_request) requests;
-       
+
        void (*cb)(struct evhttp_connection *, void *);
        void *cb_arg;
-       
+
        void (*closecb)(struct evhttp_connection *, void *);
        void *closecb_arg;
 
@@ -122,7 +122,7 @@ struct evhttp {
        TAILQ_HEAD(httpcbq, evhttp_cb) callbacks;
         struct evconq connections;
 
-       TAILQ_HEAD(vhostsq, evhttp) virtualhosts;                              
+       TAILQ_HEAD(vhostsq, evhttp) virtualhosts;
 
        /* NULL if this server is not a vhost */
         char *vhost_pattern;
index 6b175668396ed461b4fb4f0c850401174189a9ac..cf7b096f7592b1dcc878df52bce76f44cf4814d9 100644 (file)
@@ -120,8 +120,8 @@ int evhttp_accept_socket(struct evhttp *http, evutil_socket_t fd);
 void evhttp_free(struct evhttp* http);
 
 /**
-   Set a callback for a specified URI 
-    
+   Set a callback for a specified URI
+
    @param http the http sever on which to set the callback
    @param path the path for which to invoke the callback
    @param cb the callback function that gets invoked on requesting path
index 05b06ae40886bb9db202fc362d6f2dcd3c80957b..5860bafc66596eca1c815889c478e83fa1784f8e 100644 (file)
@@ -68,7 +68,7 @@ extern "C" {
 
 /**
    Determines if the member has been set in the message
-   
+
    @param msg the message to inspect
    @param member the member variable to test for presences
    @return 1 if it's present or 0 otherwise.
@@ -245,7 +245,7 @@ struct evrpc_request_wrapper *evrpc_make_request_ctx(
            (void (*)(void *))rplystruct##_clear,                       \
            (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal); \
 }
-       
+
 /** Provides access to the HTTP request object underlying an RPC
  *
  * Access to the underlying http object; can be used to look at headers or
@@ -261,18 +261,18 @@ struct evrpc_request_wrapper *evrpc_make_request_ctx(
 void evrpc_request_done(struct evrpc_req_generic *req);
 
 /** Creates the reply to an RPC request
- * 
+ *
  * EVRPC_REQUEST_DONE is used to answer a request; the reply is expected
  * to have been filled in.  The request and reply pointers become invalid
  * after this call has finished.
- * 
+ *
  * @param rpc_req the rpc request structure provided to the server callback
  */
 #define EVRPC_REQUEST_DONE(rpc_req) do { \
   struct evrpc_req_generic *_req = (struct evrpc_req_generic *)(rpc_req); \
   evrpc_request_done(_req);                                    \
 } while (0)
-  
+
 
 struct evrpc_base;
 struct evhttp;
@@ -287,7 +287,7 @@ struct evhttp;
  */
 struct evrpc_base *evrpc_init(struct evhttp *server);
 
-/** 
+/**
  * Frees the evrpc base
  *
  * For now, you are responsible for making sure that no rpcs are ongoing.
@@ -385,7 +385,7 @@ struct evrpc_status;
 int evrpc_make_request(struct evrpc_request_wrapper *ctx);
 
 /** creates an rpc connection pool
- * 
+ *
  * a pool has a number of connections associated with it.
  * rpc requests are always made via a pool.
  *
@@ -410,7 +410,7 @@ void evrpc_pool_free(struct evrpc_pool *pool);
  * @param pool the pool to which to add the connection
  * @param evcon the connection to add to the pool.
  */
-void evrpc_pool_add_connection(struct evrpc_pool *pool, 
+void evrpc_pool_add_connection(struct evrpc_pool *pool,
     struct evhttp_connection *evcon);
 
 /**
@@ -538,7 +538,7 @@ void evrpc_hook_add_meta(void *ctx, const char *key,
 int evrpc_hook_find_meta(void *ctx, const char *key,
     void **data, size_t *data_size);
 
-/** 
+/**
  * returns the connection object associated with the request
  *
  * @param ctx the context provided to the hook call
@@ -564,7 +564,7 @@ int evrpc_send_request_generic(struct evrpc_pool *pool,
 
 /**
    Function for registering a generic RPC with the RPC base.
-    
+
    Do not call this function directly, use EVRPC_REGISTER() instead.
 
    @see EVRPC_REGISTER()
index 51d0e765bd128d24c688c5cad0d0d252eb08133b..31411562b7a2b8b3856d326739feed9d6def7fd2 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
 
  */
 
-/** 
+/**
  * provides information about the completed RPC request.
  */
 struct evrpc_status {
@@ -79,7 +79,7 @@ struct evrpc {
 
        /* verifies that the reply is valid */
        int (*reply_complete)(void *);
-       
+
        /* marshals the reply into a buffer */
        void (*reply_marshal)(struct evbuffer*, void *);
 
index caed3c154ed577852737ed24f6110a5f14c3d7c0..0d26eb011b7d9efe2796f7654ffe9e2f6db2b272 100644 (file)
@@ -195,7 +195,7 @@ multiple_write_cb(int fd, short event, void *arg)
        }
 
        woff += len;
-        
+
        if (woff >= sizeof(wbuf)) {
                shutdown(fd, SHUT_WR);
                if (usepersist)
@@ -975,12 +975,12 @@ test_event_base_new(void *ptr)
        int towrite = strlen(TEST1)+1;
        int len = write(data->pair[0], TEST1, towrite);
 
-       if (len < 0) 
+       if (len < 0)
                tt_abort_perror("initial write");
        else if (len != towrite)
                tt_abort_printf(("initial write fell short (%d of %d bytes)",
                                 len, towrite));
-                       
+
        if (shutdown(data->pair[0], SHUT_WR))
                tt_abort_perror("initial write shutdown");
 
index daa03e94218072a284b1949ee25d585d5cdefc6e..adcb2b57f3e2f2ef83d2c97da79c9bf2799bf3a0 100644 (file)
@@ -1362,7 +1362,7 @@ http_bad_header_test(void *ptr)
 
 static int validate_header(
        const struct evkeyvalq* headers,
-       const char *key, const char *value) 
+       const char *key, const char *value)
 {
        const char *real_val = evhttp_find_header(headers, key);
        tt_assert(real_val != NULL);
@@ -1377,7 +1377,7 @@ http_parse_query_test(void *ptr)
        struct evkeyvalq headers;
 
        TAILQ_INIT(&headers);
-       
+
        evhttp_parse_query("http://www.test.com/?q=test", &headers);
        tt_want(validate_header(&headers, "q", "test") == 0);
        evhttp_clear_headers(&headers);