Revision 5950e362

View differences:

channel.c
1
#include <stdlib.h>
2

  
3
#include "channel.h"
4

  
5
static const char * chname = NULL;
6

  
7
void channel_set_name(char *ch)
8
{
9
  free(chname);
10
  chname = strdup(ch);
11
}
12

  
13
const char *channel_get_name()
14
{
15
  return chname;
16
}
channel.h
1
#ifndef CHANNEL_H
2
#define CHANNEL_H
3

  
4
void channel_set_name(char *);
5
const char *channel_get_name();
6

  
7
#endif

Also available in: Unified diff