/[monit]/monit/util.c
ViewVC logotype

Diff of /monit/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by chopp, Fri Sep 6 08:27:57 2002 UTC revision 1.30 by hauk, Fri Sep 6 09:54:52 2002 UTC
# Line 217  char *trim_quotes(char *s) { Line 217  char *trim_quotes(char *s) {
217    
218  }  }
219    
220    
221    /**
222     * Return TRUE if the string <i>a</i> starts with the string <i>b</i>.
223     * @param a The string to search for b in
224     * @param b The sub-string to test a against
225     * @return TRUE if a starts with b, otherwise FALSE
226     */
227    int starts_with(char *a, char *b) {
228    
229      if((!a || !b) || *a!=*b) return FALSE;
230    
231      while(*a && *b) {
232        
233        if(*a++ != *b++) return FALSE;
234        
235      }
236    
237      return TRUE;
238    
239    }
240    
241    
242  /**  /**
243   * Exchanges \escape sequences in a string   * Exchanges \escape sequences in a string
244   * @param s A string   * @param s A string
# Line 274  void handle_string_escapes(char *buf) { Line 296  void handle_string_escapes(char *buf) {
296    
297  }  }
298    
299    
300  /**  /**
301   * @param name A process name as stated in the config file   * @param name A process name as stated in the config file
302   * @return the named process or NULL of not found   * @return the named process or NULL of not found
# Line 898  char *url_encode(char *uri) { Line 921  char *url_encode(char *uri) {
921    
922  /**  /**
923   * @return a Basic Authentication Authorization string (RFC 2617),   * @return a Basic Authentication Authorization string (RFC 2617),
924   * with credentials from the Run object, NULL if credentials are not   * with credentials from the Run object, The string "\r\n" if
925   * defined.   * credentials are not defined.
926   */   */
927  char *get_basic_authentication_header() {  char *get_basic_authentication_header() {
928    
# Line 918  char *get_basic_authentication_header() Line 941  char *get_basic_authentication_header()
941    
942    }    }
943                
944    return NULL;    return xstrdup("\r\n");
945    
946  }  }
947    

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26