Changeset 1077891a


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
64735f0
Parents:
e19eb97
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 00:39:42)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
Message:
Add const qualifiers for ZNotice_t *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    re19eb97 r1077891a  
    14151415  owl_view *v;
    14161416#ifdef HAVE_LIBZEPHYR
    1417   ZNotice_t *n;
     1417  const ZNotice_t *n;
    14181418#endif
    14191419
  • message.c

    re19eb97 r1077891a  
    482482
    483483#ifdef HAVE_LIBZEPHYR
    484 ZNotice_t *owl_message_get_notice(owl_message *m)
     484const ZNotice_t *owl_message_get_notice(owl_message *m)
    485485{
    486486  return(&(m->notice));
     
    734734
    735735#ifdef HAVE_LIBZEPHYR
    736 void owl_message_create_from_znotice(owl_message *m, ZNotice_t *n)
     736void owl_message_create_from_znotice(owl_message *m, const ZNotice_t *n)
    737737{
    738738  struct hostent *hent;
     
    846846}
    847847#else
    848 void owl_message_create_from_znotice(owl_message *m, void *n)
     848void owl_message_create_from_znotice(owl_message *m, const void *n)
    849849{
    850850}
  • zephyr.c

    re19eb97 r1077891a  
    467467 */
    468468#ifdef HAVE_LIBZEPHYR
    469 char *owl_zephyr_get_field(ZNotice_t *n, int j)
     469char *owl_zephyr_get_field(const ZNotice_t *n, int j)
    470470{
    471471  int i, count, save;
     
    499499}
    500500
    501 char *owl_zephyr_get_field_as_utf8(ZNotice_t *n, int j)
     501char *owl_zephyr_get_field_as_utf8(const ZNotice_t *n, int j)
    502502{
    503503  int i, count, save;
     
    545545
    546546#ifdef HAVE_LIBZEPHYR
    547 int owl_zephyr_get_num_fields(ZNotice_t *n)
     547int owl_zephyr_get_num_fields(const ZNotice_t *n)
    548548{
    549549  int i, fields;
     
    560560}
    561561#else
    562 int owl_zephyr_get_num_fields(void *n)
     562int owl_zephyr_get_num_fields(const void *n)
    563563{
    564564  return(0);
     
    570570 * caller must free the return
    571571 */
    572 char *owl_zephyr_get_message(ZNotice_t *n, owl_message *m)
     572char *owl_zephyr_get_message(const ZNotice_t *n, owl_message *m)
    573573{
    574574  /* don't let ping messages have a body */
     
    635635
    636636#ifdef HAVE_LIBZEPHYR
    637 const char *owl_zephyr_get_zsig(ZNotice_t *n, int *k)
     637const char *owl_zephyr_get_zsig(const ZNotice_t *n, int *k)
    638638{
    639639  /* return a pointer to the zsig if there is one */
     
    656656}
    657657#else
    658 const char *owl_zephyr_get_zsig(void *n, int *k)
     658const char *owl_zephyr_get_zsig(const void *n, int *k)
    659659{
    660660  return("");
     
    725725
    726726#ifdef HAVE_LIBZEPHYR
    727 void owl_zephyr_handle_ack(ZNotice_t *retnotice)
     727void owl_zephyr_handle_ack(const ZNotice_t *retnotice)
    728728{
    729729  char *tmp;
     
    803803}
    804804#else
    805 void owl_zephyr_handle_ack(void *retnotice)
    806 {
    807 }
    808 #endif
    809 
    810 #ifdef HAVE_LIBZEPHYR
    811 int owl_zephyr_notice_is_ack(ZNotice_t *n)
     805void owl_zephyr_handle_ack(const void *retnotice)
     806{
     807}
     808#endif
     809
     810#ifdef HAVE_LIBZEPHYR
     811int owl_zephyr_notice_is_ack(const ZNotice_t *n)
    812812{
    813813  if (n->z_kind == SERVNAK || n->z_kind == SERVACK || n->z_kind == HMACK) {
     
    818818}
    819819#else
    820 int owl_zephyr_notice_is_ack(void *n)
     820int owl_zephyr_notice_is_ack(const void *n)
    821821{
    822822  return(0);
     
    10761076/* return auth string */
    10771077#ifdef HAVE_LIBZEPHYR
    1078 const char *owl_zephyr_get_authstr(ZNotice_t *n)
     1078const char *owl_zephyr_get_authstr(const ZNotice_t *n)
    10791079{
    10801080
     
    10921092}
    10931093#else
    1094 const char *owl_zephyr_get_authstr(void *n)
     1094const char *owl_zephyr_get_authstr(const void *n)
    10951095{
    10961096  return("");
Note: See TracChangeset for help on using the changeset viewer.