Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
dpi.c File Reference
#include <errno.h>
#include <stdlib.h>
#include "dpid_common.h"
#include "dpi.h"
#include "misc_new.h"
Include dependency graph for dpi.c:

Go to the source code of this file.

Functions

char * a_Dpi_sockdir_file (void)
 
char * a_Dpi_rd_dpi_socket_dir (char *dirname)
 
char * a_Dpi_srs (void)
 

Detailed Description

Access functions for ~/.dillo/dpi_socket_dir. The most useful function for dillo is a_Dpi_srs, it returns the full path to the dpid service request socket.

Definition in file dpi.c.

Function Documentation

◆ a_Dpi_rd_dpi_socket_dir()

char * a_Dpi_rd_dpi_socket_dir ( char *  dirname)

Read socket directory path from ~/.dillo/dpi_socket_dir \Return socket directory path or NULL if the dpi_socket_dir file does not exist. \Note This function exits if ~/.dillo does not exist or if the dpi_socket_dir file cannot be opened for a reason other than it does not exist.

Definition at line 51 of file dpi.c.

References dFree(), dGethomedir(), dGetline(), dStrconcat(), ERRMSG, and MSG_ERR.

Referenced by a_Dpi_srs(), and init_sockdir().

◆ a_Dpi_sockdir_file()

char * a_Dpi_sockdir_file ( void  )

\Return Returns path to the dpi_socket_dir file Use dFree to free memory

Definition at line 34 of file dpi.c.

References dGethomedir(), and dStrconcat().

Referenced by a_Dpi_srs(), and main().

◆ a_Dpi_srs()

char * a_Dpi_srs ( void  )

\Modifies srs_name \Return The service request socket name with its complete path.

Definition at line 87 of file dpi.c.

References a_Dpi_rd_dpi_socket_dir(), a_Dpi_sockdir_file(), dFree(), dStrconcat(), dStrstrip(), and srs_name.